﻿/*****************************************************************//**
 * @file    FITKViewAdaptorSurface.h
 * @brief   Adaptor for surface data.
 *  
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-04-01
 *********************************************************************/

#ifndef __FITKVIEWADAPTORSURFACE_H__
#define __FITKVIEWADAPTORSURFACE_H__

#include "FITKVTKViewAdaptorBase.h"

#include "FITKVTKGraphAdaptorAPI.h"

namespace Exchange
{
    /**
     * @brief   Graph object data adaptor for 'surface'.
     * @author  ChengHaotian (yeguangbaozi@foxmail.com)
     * @date    2024-04-01
     */
    class FITKVTKGRAPHADAPTORAPI FITKViewAdaptorSurface : public FITKVTKViewAdaptorBase
    {
        // Regist
        FITKCLASS(Exchange, FITKViewAdaptorSurface);

    public:
        /**
         * @brief   Constructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-01
         */
        explicit FITKViewAdaptorSurface() = default;

        /**
         * @brief   Destructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-01
         */
        ~FITKViewAdaptorSurface() = default;

        /**
         * @brief   Execute the data exchange.[override]
         * @return  Is OK
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-01
         */
        bool update() override;

    };

    // Regist element surface adaptor
    Register2FITKViewAdaptorFactory(Surface, Interface::FITKMeshSurfaceElement, FITKViewAdaptorSurface, 1);

    // Regist node surface adaptor
    Register2FITKViewAdaptorFactory(Surface, Interface::FITKMeshSurfaceNode, FITKViewAdaptorSurface, 2);
}   // namespace Exchange

#endif // __FITKVIEWADAPTORSURFACE_H__